package com.ruoyi.conversationGroup.service.impl;

import java.util.Date;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.conversationGroup.mapper.CodeConversationGroupMapper;
import com.ruoyi.conversationGroup.domain.CodeConversationGroup;
import com.ruoyi.conversationGroup.service.ICodeConversationGroupService;

/**
 * conversationGroupService业务层处理
 * 
 * @author wubing
 * @date 2024-09-09
 */
@Service
public class CodeConversationGroupServiceImpl implements ICodeConversationGroupService 
{
    @Autowired
    private CodeConversationGroupMapper codeConversationGroupMapper;

    /**
     * 查询conversationGroup
     * 
     * @param id conversationGroup主键
     * @return conversationGroup
     */
    @Override
    public CodeConversationGroup selectCodeConversationGroupById(Long id)
    {
        return codeConversationGroupMapper.selectCodeConversationGroupById(id);
    }

    /**
     * 查询conversationGroup列表
     * 
     * @param codeConversationGroup conversationGroup
     * @return conversationGroup
     */
    @Override
    public List<CodeConversationGroup> selectCodeConversationGroupList(CodeConversationGroup codeConversationGroup)
    {
        return codeConversationGroupMapper.selectCodeConversationGroupList(codeConversationGroup);
    }

    /**
     * 新增conversationGroup
     * 
     * @param codeConversationGroup conversationGroup
     * @return 结果
     */
    @Override
    public int insertCodeConversationGroup(CodeConversationGroup codeConversationGroup)
    {
        Date nowDate = DateUtils.getNowDate();
        codeConversationGroup.setCreateTime(nowDate);
        codeConversationGroup.setUpdateTime(nowDate);
        return codeConversationGroupMapper.insertCodeConversationGroup(codeConversationGroup);
    }

    /**
     * 修改conversationGroup
     * 
     * @param codeConversationGroup conversationGroup
     * @return 结果
     */
    @Override
    public int updateCodeConversationGroup(CodeConversationGroup codeConversationGroup)
    {
        codeConversationGroup.setUpdateTime(DateUtils.getNowDate());
        return codeConversationGroupMapper.updateCodeConversationGroup(codeConversationGroup);
    }

    /**
     * 批量删除conversationGroup
     * 
     * @param ids 需要删除的conversationGroup主键
     * @return 结果
     */
    @Override
    public int deleteCodeConversationGroupByIds(Long[] ids)
    {
        return codeConversationGroupMapper.deleteCodeConversationGroupByIds(ids);
    }

    /**
     * 删除conversationGroup信息
     * 
     * @param id conversationGroup主键
     * @return 结果
     */
    @Override
    public int deleteCodeConversationGroupById(Long id)
    {
        return codeConversationGroupMapper.deleteCodeConversationGroupById(id);
    }
}
